UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dHEJhD1/arv0qhn+WVJmP+rl11KPAqPvqhrISBuyj08='
WHERE
key_id = '19bb53205d5d760439dfc81c035077319491dfe36c0326945f128f66618af788'
AND (
token = 'dHEJhD1/arv0qhn+WVJmP+rl11KPAqPvqhrISBuyj08='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)