UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uXUIPirGVF8GEKWlD+u5dGJQL5oKu2JoHHDhmHRG7OI='
WHERE
key_id = '069e4ad2d128d2cc9f4ace58b4b83a8ae8483e4bf05ce5bfe81d089e4357c147'
AND (
token = 'uXUIPirGVF8GEKWlD+u5dGJQL5oKu2JoHHDhmHRG7OI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)