UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rKK3H6K/rDuAfKHy4w7QKFaNLNQhwpDjeAOU3hPRqoU='
WHERE
key_id = '775141305377bfd33a1f022fdf2d7716fbb8e138161cf6dff427a540c80f0015'
AND (
token = 'rKK3H6K/rDuAfKHy4w7QKFaNLNQhwpDjeAOU3hPRqoU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)