UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hHzXNdS498JLhNrZyXy/Lxc2v5I/QvddWnwcmIu0aqE='
WHERE
key_id = '925e3625b00949314521e1b3f01ca7394ac8266a5852abd2795a9f834c05306a'
AND (
token = 'hHzXNdS498JLhNrZyXy/Lxc2v5I/QvddWnwcmIu0aqE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)