UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZHSHwwvckpz0q27RiZ4/JMQAp1fgH7BUJMpgMc20O/4='
WHERE
key_id = '885b975872ee090f8f976d3db2be32b2314c1754b3b670ada4aa35a17134ae3e'
AND (
token = 'ZHSHwwvckpz0q27RiZ4/JMQAp1fgH7BUJMpgMc20O/4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)