UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GGKS3HM3A0KzuEOWvHyA7h0xLfXD9Lm8zBlMWsppN/8='
WHERE
key_id = '5a120f9b2b65b92beac5ad28763df9ce9e5a9e3533c861d0ff56fe2e4cf839a7'
AND (
token = 'GGKS3HM3A0KzuEOWvHyA7h0xLfXD9Lm8zBlMWsppN/8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)