UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lvzXiLSNLBxpzWV2YCwexbZSnjiSR5nb4PIv7FvaXQQ='
WHERE
key_id = 'f10f1fa999f66493d7de044c83babad584006ab12e7fb5870cf3454cdd7b9eb9'
AND (
token = 'lvzXiLSNLBxpzWV2YCwexbZSnjiSR5nb4PIv7FvaXQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)