UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rtxzOJthnh3BE/7E0EIVJY9Eu4zWNKGw22bLeoSZwkc=' 
WHERE 
  key_id = '3fa2953f21521c70849d0bb188c8f5a8d94b81d0c28248303784fa0ac93b5ce9' 
  AND (
    token = 'rtxzOJthnh3BE/7E0EIVJY9Eu4zWNKGw22bLeoSZwkc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037