UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+AafxB+bUxqA1VFYP+aQZBm/4VA5cvSfHMn1CLNbYtA=' 
WHERE 
  key_id = '32043f72dabddecacd12e034f749f2e2a0a18fb93cd6d5616599c08c90b803d2' 
  AND (
    token = '+AafxB+bUxqA1VFYP+aQZBm/4VA5cvSfHMn1CLNbYtA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034