UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jh1UIQbCQR6bHgLHYiADtNGNMGVxLVkwUI/GJI652ik='
WHERE
key_id = '53df4ff5a6d08b42a39bdc5055520c6d92b9addb9d1134fd671397072fdaf00c'
AND (
token = 'Jh1UIQbCQR6bHgLHYiADtNGNMGVxLVkwUI/GJI652ik='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)