UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'taoq2jcmmof0cd71Z26bl7uyCbGzOXEfnk2JSrQHpfU='
WHERE
key_id = '3604e212c9a31a413bfe899ade67e424507e2845ed0946b855595d71eac06130'
AND (
token = 'taoq2jcmmof0cd71Z26bl7uyCbGzOXEfnk2JSrQHpfU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)