UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tgkIK9dslAzus/q2ZZXcJu6EH2/SLcOTPlQRKxngXX0=' 
WHERE 
  key_id = '62287a095ffe3df22f250bea38fd9a8ec2a108f1d25676a2a562129d9d7a1177' 
  AND (
    token = 'tgkIK9dslAzus/q2ZZXcJu6EH2/SLcOTPlQRKxngXX0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046