UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VFqv6goP5uHO5dQRE8LrYzYyllC7dhOGlq3jvx0urJE='
WHERE
key_id = '25b9fae69ae801c299d8f2cc8abc3bda8a6a4d0e7b15c0563c5cf3c18381768d'
AND (
token = 'VFqv6goP5uHO5dQRE8LrYzYyllC7dhOGlq3jvx0urJE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)