UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FMMadK7jqarn/KWN5zSIg9nl+cXw/YLYup9z9fpkAZA='
WHERE
key_id = '2a44c73f925b4bb0391b5b654b685131f97d953e6ad8b2d2d29aa87678cf3151'
AND (
token = 'FMMadK7jqarn/KWN5zSIg9nl+cXw/YLYup9z9fpkAZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)