UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Dff7ZF14h6RCbf/fRIYa12kT8pEhRWK5cjwewVNlkIw=' 
WHERE 
  key_id = '11c6c56a9bc9e35dec31a7645a6fe0d47ccd81a26470af7a58f342d9fe45117d' 
  AND (
    token = 'Dff7ZF14h6RCbf/fRIYa12kT8pEhRWK5cjwewVNlkIw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045