UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oPPTMf7laI84rcywmRQBZuE8DGvan1xYpjE70VsIUwc='
WHERE
key_id = '53766cf91903841c97ff4c5793d1d93330fb7f7fc10edcc0a1557b34053cfca7'
AND (
token = 'oPPTMf7laI84rcywmRQBZuE8DGvan1xYpjE70VsIUwc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)