UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L9rdnd5eI5IsiGUMrJHZj1zdZcXncIuQp7cPj7cU/SE='
WHERE
key_id = '149077425fa74c5517158b69f5874e89c47fbd2ac2a7e60b9077e0de2a31f537'
AND (
token = 'L9rdnd5eI5IsiGUMrJHZj1zdZcXncIuQp7cPj7cU/SE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)