UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y6H9FRs0HnIjkwiEq5YVH69FO53kl1WhIsTNRPqlNJA='
WHERE
key_id = '83c92e00c5ab3a67e514460d44d8bdd87aae81237d96eb766d60071c9bfd5e33'
AND (
token = 'y6H9FRs0HnIjkwiEq5YVH69FO53kl1WhIsTNRPqlNJA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)