UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WEbwDr6sG2w2lhVhuTUa4JAVLmiO9R/YNUGTWVYZMH8='
WHERE
key_id = '2ab6bed84b7ebf3796a741f569ba352a676d81d3815a912103a59e0313cbe5f7'
AND (
token = 'WEbwDr6sG2w2lhVhuTUa4JAVLmiO9R/YNUGTWVYZMH8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)