UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cjYxQLu/kPmaM/8Na8aIGe0dDyi9Us+kmmd8nKNdq/0='
WHERE
key_id = '8f71e6116d07584b8c36be13e50f7677460fafc504fc06c9fb5abda13e5b1a08'
AND (
token = 'cjYxQLu/kPmaM/8Na8aIGe0dDyi9Us+kmmd8nKNdq/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)