UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GVf97gNB8TH8H1eXBcW21yAc/CdYrHrhEBxpmX8QRLw='
WHERE
key_id = 'a73d062a16c88aa077cb0dacaad3c4c056013d4322ff279dc5954928117dc275'
AND (
token = 'GVf97gNB8TH8H1eXBcW21yAc/CdYrHrhEBxpmX8QRLw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)