UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 's1g3KGJyDBcdBZO5LX39w/X7WqL3KsCr+XM4K5eTsCY=' 
WHERE 
  key_id = 'd3604f279f634d5bdb7bbd7e95267f5879cdc68cfd0ecc48e922ffcf1232c772' 
  AND (
    token = 's1g3KGJyDBcdBZO5LX39w/X7WqL3KsCr+XM4K5eTsCY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051