UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'orSRLwfOUSIGVB7vOb0jMI7WLCdf/BMOFyjB3RZA7kg=' 
WHERE 
  key_id = '1f3484cb4a4a26501e9a089cec754ea749cb699884faff7d3569ba50755fd49f' 
  AND (
    token = 'orSRLwfOUSIGVB7vOb0jMI7WLCdf/BMOFyjB3RZA7kg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029