UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RVkPtvgkYkHhFpSo0c8VvLfHN3yrk1Y2HF47NnKQqDo='
WHERE
key_id = '32ef6e48210b06eb953c7fd59add7bc816aed5c1cc8b839fa71eca9952476a11'
AND (
token = 'RVkPtvgkYkHhFpSo0c8VvLfHN3yrk1Y2HF47NnKQqDo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)