UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DRkCkTXvior5YKiStKPv5MHVAQQVy/RHTIIxDexsUqw='
WHERE
key_id = '276663118cdde0fc287d4a8bbcb065418d680fe0635c79010dabed84a59a1a49'
AND (
token = 'DRkCkTXvior5YKiStKPv5MHVAQQVy/RHTIIxDexsUqw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)