UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/6I5A3vet3KIqU+ce4XVwsZCZUm4onJh9W1XPtsgzv8=' 
WHERE 
  key_id = '6a08003f29f7e143e71703a5f8c2c199d7527f19f9e383abaf36284eb4f9955f' 
  AND (
    token = '/6I5A3vet3KIqU+ce4XVwsZCZUm4onJh9W1XPtsgzv8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031