UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SFmtKMk83yHVwHHTI+JSSHeOJO6KCp3zvBfMj8sMkRs='
WHERE
key_id = '2b43b8d3e6397b6fed2e4a4f70dbc45ce1f94dab3a3fcb25eab62305d9b53d60'
AND (
token = 'SFmtKMk83yHVwHHTI+JSSHeOJO6KCp3zvBfMj8sMkRs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)