UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'r0cyH+W2T+x85EYTL4JvG9B2AMPwdplLUStrpzBEKbk=' 
WHERE 
  key_id = '259c8a1ab5f4332f6fd64b8ca059ccdbf1f569f2d79e350440fc6abf7693fa42' 
  AND (
    token = 'r0cyH+W2T+x85EYTL4JvG9B2AMPwdplLUStrpzBEKbk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024