UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'O5iE2PWwuRWpGnc3yRzxsC0sRgvtGSlQt4jJ/V22xNs='
WHERE
key_id = '427b75d0cb01e0658cbb8fcd452e8d24dd23e9511cdf79a41ed10173b8e37d21'
AND (
token = 'O5iE2PWwuRWpGnc3yRzxsC0sRgvtGSlQt4jJ/V22xNs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)