UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ABxqQgsoD4A657EuQ/JNaSltM353EwZxfSbe7MAHQ3Y='
WHERE
key_id = '72893ad9c6158fcde59af94d0f4224d75d0a6957cbd5eb81ec6ae749287cef90'
AND (
token = 'ABxqQgsoD4A657EuQ/JNaSltM353EwZxfSbe7MAHQ3Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)