UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hRKWpHXzMZwqNHC7OfFE7QwXI/XOWzK9oPiIN/PWnno='
WHERE
key_id = '6043a09bbd3da2686b7f732600c440c3a6f75faca27e4bfb1420fa9680755841'
AND (
token = 'hRKWpHXzMZwqNHC7OfFE7QwXI/XOWzK9oPiIN/PWnno='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)