UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FAoFFqnLQ5iIIY5h9SxaZJ5ZK4n9tWKS/N3HFkZSEVM=' 
WHERE 
  key_id = 'ef3d60fb6e2de009cbb57df41e3e91df6bc6adc6253988863adb77c6413f15c0' 
  AND (
    token = 'FAoFFqnLQ5iIIY5h9SxaZJ5ZK4n9tWKS/N3HFkZSEVM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033